import React , {Component}from 'react';
import { Modal, Button } from 'antd';
import InputBox from '../../common/InputBox.js'
import Confirm from '../../common/Confirm'
import Select from '../../common/Select'

/*系统后台>后台管理>后台人员列表>用户列表>新增人员*/

export default class Addperson extends React.Component {
    constructor(props){
        super(props);
        this.state = { visible: false }
        this.Style={};
    }

    componentWillMount() {
        this.Style.addpersonview={
            textAlign:"center",
            display:"block",
            border:"3px solid green"
        }
        this.Style.addpersonview.width = 400;
        this.Style.addpersonview.height = 200;
        this.Style.addpersonview.fontSize = 30;

        this.Style.addpersonview={
            width:"634px",
            height:"44px",
            paddingLeft:"18px",
            lineHeight:"44px",
            display:"block",
            background:"#f2f2f2",
            marginBottom:49
        }
    }

    state = { visible: false }
    showModal = () => {
        this.setState({
            visible: true,
        });
    }
    handleOk = (e) => {
        console.log(e);
        this.setState({
            visible: false,
        });
    }
    handleCancel = (e) => {
        console.log(e);
        this.setState({
            visible: false,
        });
    }

    createuser(){
        alert(1);
    }

    render(){
        return (

            <Modal visible={this.state.visible} onOk={this.handleOk} onCancel={this.handleCancel} style={{width:"634px",height:"240px",display:"block"}} title={"新增人员"}>
                <InputBox defaultvalute="请输入手机号" titletext="手机号" space="12px" style={{width:338,height:30,borderColor:"#d7d7d7",color:"#999",marginTop:"20px",paddingRight:123}}/>
                <InputBox defaultvalute="请输入姓名" titletext="姓名" space="12px" style={{width:338,height:30,borderColor:"#d7d7d7",color:"#999",marginTop:"20px",paddingRight:123}}/>
                <InputBox type="password" defaultvalute="请输入密码" titletext="密码" space="12px" style={{width:338,height:30,borderColor:"#d7d7d7",color:"#999",marginTop:"20px",paddingRight:123}}/>
                <label style={{display:"block",marginLeft:124,marginTop:12}}><input type="checkbox" style={{display:"inlineBlock",marginRight:5}}/>设为默认密码</label>
                <Select var oArr={oArr1} style={{width:338,height:30,display:"inlineBlock",marginTop:20,marginLeft:124}}/>
                <Confirm tcontext="添加" style={{width:130,height:30,display:"block",color:"#fff",fontSize:"16px",marginTop:60,marginLeft:220}} touch={this.createuser.bind(this)}/>
                <span style={{position:"absolute",left:470,top:6}}>(用作登陆账号)</span>
            </Modal>
        )
    }
}

var oArr1=[
    {text:"请选择角色",value:"0"},
    {text:"教师",value:"1"},
    {text:"医生",value:"2"},
    {text:"学生",value:"3"}
]



